package com.fuhe.chen.vendingmachine.dao;

import com.fuhe.chen.vendingmachine.pojo.RefundApply;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RefundApplyDao {

    /**
     * 添加订单退款申请
     * @param refundApply
     */
    void addRefundApply(RefundApply refundApply);

    /**
     * 删除订单退款申请
     * @param applyId
     */
    void deleteRefundApply(@Param("id") Integer applyId);

    /**
     * 删除订单退款申请
     * @param orderId
     */
    void deleteRefundApplyByOrderId(@Param("orderId") String orderId);

    /**
     * 查询所有订单退款申请
     */
    List<RefundApply> findAll();

    /**
     * 根据条件查询订单退款申请
     * @param
     */
    RefundApply findByOrderId(@Param("bool_order_id") Integer bool_order_id);

    /**
     * 修改退款信息状态
     * @param refundApplyId
     * @param status
     */
    void updateStatus(@Param("refundApplyId")Integer refundApplyId, @Param("status")Integer status);
}
